Skip to content

Conversation

@clonker
Copy link
Member

@clonker clonker commented Jan 6, 2026

Theoretically, loadimmutable inserts a placeholder into the contract to be deployed which is then replaced by setimmutable once the runtime code is loaded into memory.

The interpreter is mainly used for differential fuzzing so we should satisfy that correct code never fails and we can still - most of the time - detect bugs.

Therefore, loadimmutable is decoupled from setimmutable and just returns a random value (hash of the identifier), setimmutable is treated as a no-op.

…utable

Theoretically, loadimmutable inserts a placeholder into the contract to be deployed which is then replaced by setimmutable once the runtime code is loaded into memory.

The interpreter is mainly used for differential fuzzing so we should satisfy that correct code never fails and we can still detect bugs otherwise, most of the time.

Therefore loadimmutable is decoupled from setimmutable and just returns a random value (hash of the identifier), setimmutable is treated as a no-op.
@clonker clonker force-pushed the evm_instruction_interpreter_kiss_immutables branch from 7f71643 to f8cae91 Compare January 6, 2026 12:01
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to have at least some minimal smoke tests for the interpreter. Working with code that's not covered with any tests and you can't tell immediately if you broke it is never nice.

We could create something like test/libyul/yulInterpreterTests/isoltestTesting/ and put such tests there. We do that with other kinds of tests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually wanted to comment the same for #16267 earlier, but that was merged before I got to it :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I agree, would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants